var VkWidget = Base.extend(
{
    GROUP_ID: 43503656,
    DEFAULT_WIDGET_SETTINGS: {mode: 0, width: "291", height: "215"},
    VK_GROUPS: "vkGroups",
    PLANE_TABLE_MIN_SIZE: 768,

    _containerId: null,
    _widgetSettings: null,
    _isOnceInitVk1: false,

    constructor: function(containerId, settings)
    {
        this._containerId = containerId;
        this._extendDefaultWidgetSettings(settings);
        this._resizeHandler();
        $(window).bind( 'resize', handler( this, '_resizeHandler' ) );
    },

    _extendDefaultWidgetSettings: function(settings)
    {
        this._widgetSettings = $.extend(true, this.DEFAULT_WIDGET_SETTINGS, settings);
    },

    _resizeHandler: function()
    {
        var windowWidth = $(window).width();
        if ( ( windowWidth >= this.PLANE_TABLE_MIN_SIZE ) && ( !this._isOnceInitVk1 ) )
        {
            this._isOnceInitVk1 = true;
            VK.Widgets.Group( this._containerId, this._widgetSettings, this.GROUP_ID );
        }
    }
});





